🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / model / src / commonMain / kotlin / org / meshtastic / core / model / EventEdition.kt
Displaying Raw • Download
core/model/src/commonMain/kotlin/org/meshtastic/core/model/EventEdition.kt 4e15ef1c7f68f8c683fe8b7ff741a5167e154d2e (4e15ef1c) Text, 2.64 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.model
Tff7b72import T7ee787org.jetbrains.compose.resources.DrawableResource
Tff7b72import T7ee787org.jetbrains.compose.resources.StringResource
Tff7b72import T7ee787org.meshtastic.core.resources.Res
Tff7b72import T7ee787org.meshtastic.core.resources.event_welcome_burning_man
Tff7b72import T7ee787org.meshtastic.core.resources.event_welcome_defcon
Tff7b72import T7ee787org.meshtastic.core.resources.event_welcome_hamvention
Tff7b72import T7ee787org.meshtastic.core.resources.event_welcome_open_sauce
Tff7b72import T7ee787org.meshtastic.core.resources.img_event_hamvention
Tff7b72import T7ee787org.meshtastic.proto.FirmwareEdition
T8b949e/**
* Display metadata for event-specific firmware editions. Maps a [FirmwareEdition] proto enum to the resources needed to
* render event branding in the UI (toolbar icon, welcome message, etc.).
*/
Tff7b72data Tff7b72class T56d364EventEditionTb4b4b4(Tff7b72val Te6edf3nameTb4b4b4: Tffa657StringTb4b4b4, Tff7b72val Te6edf3iconResTb4b4b4: Te6edf3DrawableResource?Tb4b4b4, Tff7b72val Te6edf3welcomeMessageResTb4b4b4: Te6edf3StringResourceTb4b4b4)
T8b949e/**
* Maps a [FirmwareEdition] to its [EventEdition] display metadata, or `null` if the edition is not an event (e.g.,
* VANILLA, SMART_CITIZEN) or is unrecognized.
*/
Tff7b72fun Te6edf3FirmwareEditionTb4b4b4.Td2a8fftoEventEditionTb4b4b4(Tb4b4b4)Tb4b4b4: Te6edf3EventEdition? Tff7b72= Tff7b72when Tb4b4b4(Tff7b72thisTb4b4b4) Tb4b4b4{
Te6edf3FirmwareEditionTb4b4b4.Te6edf3HAMVENTION Tff7b72-Tff7b72>
Te6edf3EventEditionTb4b4b4(
Te6edf3name Tff7b72= Ta5d6ff"Ta5d6ffHamventionTa5d6ff"Tb4b4b4,
Te6edf3iconRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3drawableTb4b4b4.Te6edf3img_event_hamventionTb4b4b4,
Te6edf3welcomeMessageRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3event_welcome_hamventionTb4b4b4,
Tb4b4b4)
Te6edf3FirmwareEditionTb4b4b4.Te6edf3OPEN_SAUCE Tff7b72-Tff7b72>
Te6edf3EventEditionTb4b4b4(Te6edf3name Tff7b72= Ta5d6ff"Ta5d6ffOpen SauceTa5d6ff"Tb4b4b4, Te6edf3iconRes Tff7b72= Tff7b72nullTb4b4b4, Te6edf3welcomeMessageRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3event_welcome_open_sauceTb4b4b4)
Te6edf3FirmwareEditionTb4b4b4.Te6edf3DEFCON Tff7b72-Tff7b72>
Te6edf3EventEditionTb4b4b4(Te6edf3name Tff7b72= Ta5d6ff"Ta5d6ffDEFCONTa5d6ff"Tb4b4b4, Te6edf3iconRes Tff7b72= Tff7b72nullTb4b4b4, Te6edf3welcomeMessageRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3event_welcome_defconTb4b4b4)
Te6edf3FirmwareEditionTb4b4b4.Te6edf3BURNING_MAN Tff7b72-Tff7b72>
Te6edf3EventEditionTb4b4b4(Te6edf3name Tff7b72= Ta5d6ff"Ta5d6ffBurning ManTa5d6ff"Tb4b4b4, Te6edf3iconRes Tff7b72= Tff7b72nullTb4b4b4, Te6edf3welcomeMessageRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3event_welcome_burning_manTb4b4b4)
Tff7b72else Tff7b72-Tff7b72> Tff7b72null
Tb4b4b4}
T8b949e/** Returns `true` if this edition represents an event firmware (value >= 16, excluding DIY). */
Tff7b72fun Te6edf3FirmwareEditionTb4b4b4.Td2a8ffisEventEditionTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657Boolean Tff7b72= Te6edf3toEventEditionTb4b4b4(Tb4b4b4) Tff7b72!Tff7b72= Tff7b72null
Served by rngit 1.5.0 - Generated in 0.04s